program namelisttest
	implicit none
	integer:: a, b, c, d
	character(len=10):: e
	namelist /myna1/ a, b
	namelist /myna2/ c, d, e
	open( 10, file = "namelisttest.txt")
	read( 10, nml=myna2 )
	close(10)
	open( 10, file = "namelisttest.txt")
	read( 10, nml=myna1 )
	close(10)
	print *, a
	print *, b
	read( e, *) a,b
	print *, a
	print *, b
	write(*, nml=myna2)
	stop
end program
